package com.ruoyi.base.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.base.mapper.GasBalanceMapper;
import com.ruoyi.base.domain.GasBalance;
import com.ruoyi.base.service.IGasBalanceService;

/**
 * 客户余额
Service业务层处理
 * 
 * @author hw
 * @date 2023-01-07
 */
@Service
public class GasBalanceServiceImpl implements IGasBalanceService 
{
    @Autowired
    private GasBalanceMapper gasBalanceMapper;

    /**
     * 查询客户余额

     * 
     * @param balanceId 客户余额
主键
     * @return 客户余额

     */
    @Override
    public GasBalance selectGasBalanceByBalanceId(Long balanceId)
    {
        return gasBalanceMapper.selectGasBalanceByBalanceId(balanceId);
    }

    /**
     * 查询客户余额
列表
     * 
     * @param gasBalance 客户余额

     * @return 客户余额

     */
    @Override
    public List<GasBalance> selectGasBalanceList(GasBalance gasBalance)
    {
        return gasBalanceMapper.selectGasBalanceList(gasBalance);
    }

    /**
     * 新增客户余额

     * 
     * @param gasBalance 客户余额

     * @return 结果
     */
    @Override
    public int insertGasBalance(GasBalance gasBalance)
    {
        gasBalance.setCreateTime(DateUtils.getNowDate());
        return gasBalanceMapper.insertGasBalance(gasBalance);
    }

    /**
     * 修改客户余额

     * 
     * @param gasBalance 客户余额

     * @return 结果
     */
    @Override
    public int updateGasBalance(GasBalance gasBalance)
    {
        gasBalance.setUpdateTime(DateUtils.getNowDate());
        return gasBalanceMapper.updateGasBalance(gasBalance);
    }

    /**
     * 批量删除客户余额

     * 
     * @param balanceIds 需要删除的客户余额
主键
     * @return 结果
     */
    @Override
    public int deleteGasBalanceByBalanceIds(Long[] balanceIds)
    {
        return gasBalanceMapper.deleteGasBalanceByBalanceIds(balanceIds);
    }

    /**
     * 删除客户余额
信息
     * 
     * @param balanceId 客户余额
主键
     * @return 结果
     */
    @Override
    public int deleteGasBalanceByBalanceId(Long balanceId)
    {
        return gasBalanceMapper.deleteGasBalanceByBalanceId(balanceId);
    }
}
